﻿resizeTo(360,270);
Jx().$package("hotspot",function(J) {
	function start() {
		var ssid = ssidfield.value;
		var pswd = pswdfield.value;
		if(ssid && pswd) {
			ws.Run("handler " + ssid + " " + pswd);
			alert("操作完成");
		}
		else {
			alert("SSID和密码不能为空");
		}
		location.reload();
	}
	function stop() {
		ws.Run("handler stop");
		alert("操作完成");
		location.reload();
	}
	var ssidfield = J.dom.id("ssid");
	var pswdfield = J.dom.id("pswd");
	var startbtn = J.dom.id("start");
	var stopbtn = J.dom.id("stop");
	var ws = new ActiveXObject("WScript.Shell");
	J.event.on(startbtn,"click",start);
	J.event.on(stopbtn,"click",stop);
})